3.475 \(\int \frac{\sec ^4(c+d x) (A+B \sec (c+d x)+C \sec ^2(c+d x))}{(a+a \sec (c+d x))^4} \, dx\)

Optimal. Leaf size=204 \[ \frac{(6 A-55 B+244 C) \tan (c+d x)}{105 a^4 d}+\frac{(3 A+25 B-88 C) \tan (c+d x) \sec ^2(c+d x)}{105 a^4 d (\sec (c+d x)+1)^2}+\frac{(B-4 C) \tanh ^{-1}(\sin (c+d x))}{a^4 d}-\frac{(B-4 C) \tan (c+d x)}{a^4 d (\sec (c+d x)+1)}-\frac{(A-B+C) \tan (c+d x) \sec ^4(c+d x)}{7 d (a \sec (c+d x)+a)^4}+\frac{(2 A+5 B-12 C) \tan (c+d x) \sec ^3(c+d x)}{35 a d (a \sec (c+d x)+a)^3} \]

[Out]

((B - 4*C)*ArcTanh[Sin[c + d*x]])/(a^4*d) + ((6*A - 55*B + 244*C)*Tan[c + d*x])/(105*a^4*d) + ((3*A + 25*B - 8
8*C)*Sec[c + d*x]^2*Tan[c + d*x])/(105*a^4*d*(1 + Sec[c + d*x])^2) - ((B - 4*C)*Tan[c + d*x])/(a^4*d*(1 + Sec[
c + d*x])) - ((A - B + C)*Sec[c + d*x]^4*Tan[c + d*x])/(7*d*(a + a*Sec[c + d*x])^4) + ((2*A + 5*B - 12*C)*Sec[
c + d*x]^3*Tan[c + d*x])/(35*a*d*(a + a*Sec[c + d*x])^3)

________________________________________________________________________________________

Rubi [A]  time = 0.629072, antiderivative size = 204, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 41, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.171, Rules used = {4084, 4019, 4008, 3787, 3770, 3767, 8} \[ \frac{(6 A-55 B+244 C) \tan (c+d x)}{105 a^4 d}+\frac{(3 A+25 B-88 C) \tan (c+d x) \sec ^2(c+d x)}{105 a^4 d (\sec (c+d x)+1)^2}+\frac{(B-4 C) \tanh ^{-1}(\sin (c+d x))}{a^4 d}-\frac{(B-4 C) \tan (c+d x)}{a^4 d (\sec (c+d x)+1)}-\frac{(A-B+C) \tan (c+d x) \sec ^4(c+d x)}{7 d (a \sec (c+d x)+a)^4}+\frac{(2 A+5 B-12 C) \tan (c+d x) \sec ^3(c+d x)}{35 a d (a \sec (c+d x)+a)^3} \]

Antiderivative was successfully verified.

[In]

Int[(Sec[c + d*x]^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + a*Sec[c + d*x])^4,x]

[Out]

((B - 4*C)*ArcTanh[Sin[c + d*x]])/(a^4*d) + ((6*A - 55*B + 244*C)*Tan[c + d*x])/(105*a^4*d) + ((3*A + 25*B - 8
8*C)*Sec[c + d*x]^2*Tan[c + d*x])/(105*a^4*d*(1 + Sec[c + d*x])^2) - ((B - 4*C)*Tan[c + d*x])/(a^4*d*(1 + Sec[
c + d*x])) - ((A - B + C)*Sec[c + d*x]^4*Tan[c + d*x])/(7*d*(a + a*Sec[c + d*x])^4) + ((2*A + 5*B - 12*C)*Sec[
c + d*x]^3*Tan[c + d*x])/(35*a*d*(a + a*Sec[c + d*x])^3)

Rule 4084

Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^
(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> -Simp[((a*A - b*B + a*C)*Cot[e + f*x]*(a + b*Cs
c[e + f*x])^m*(d*Csc[e + f*x])^n)/(a*f*(2*m + 1)), x] - Dist[1/(a*b*(2*m + 1)), Int[(a + b*Csc[e + f*x])^(m +
1)*(d*Csc[e + f*x])^n*Simp[a*B*n - b*C*n - A*b*(2*m + n + 1) - (b*B*(m + n + 1) - a*(A*(m + n + 1) - C*(m - n)
))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B, C, n}, x] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)]

Rule 4019

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*
(B_.) + (A_)), x_Symbol] :> Simp[(d*(A*b - a*B)*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^(n - 1))/
(a*f*(2*m + 1)), x] - Dist[1/(a*b*(2*m + 1)), Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^(n - 1)*Simp[A
*(a*d*(n - 1)) - B*(b*d*(n - 1)) - d*(a*B*(m - n + 1) + A*b*(m + n))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b,
d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)] && GtQ[n, 0]

Rule 4008

Int[csc[(e_.) + (f_.)*(x_)]^2*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_
)), x_Symbol] :> -Simp[((A*b - a*B)*Cot[e + f*x]*(a + b*Csc[e + f*x])^m)/(b*f*(2*m + 1)), x] + Dist[1/(b^2*(2*
m + 1)), Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*Simp[A*b*m - a*B*m + b*B*(2*m + 1)*Csc[e + f*x], x], x]
, x] /; FreeQ[{a, b, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)]

Rule 3787

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{\sec ^4(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^4} \, dx &=-\frac{(A-B+C) \sec ^4(c+d x) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}+\frac{\int \frac{\sec ^4(c+d x) (a (3 A+4 B-4 C)+a (A-B+8 C) \sec (c+d x))}{(a+a \sec (c+d x))^3} \, dx}{7 a^2}\\ &=-\frac{(A-B+C) \sec ^4(c+d x) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}+\frac{(2 A+5 B-12 C) \sec ^3(c+d x) \tan (c+d x)}{35 a d (a+a \sec (c+d x))^3}+\frac{\int \frac{\sec ^3(c+d x) \left (3 a^2 (2 A+5 B-12 C)+a^2 (3 A-10 B+52 C) \sec (c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx}{35 a^4}\\ &=\frac{(3 A+25 B-88 C) \sec ^2(c+d x) \tan (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac{(A-B+C) \sec ^4(c+d x) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}+\frac{(2 A+5 B-12 C) \sec ^3(c+d x) \tan (c+d x)}{35 a d (a+a \sec (c+d x))^3}+\frac{\int \frac{\sec ^2(c+d x) \left (2 a^3 (3 A+25 B-88 C)+a^3 (6 A-55 B+244 C) \sec (c+d x)\right )}{a+a \sec (c+d x)} \, dx}{105 a^6}\\ &=\frac{(3 A+25 B-88 C) \sec ^2(c+d x) \tan (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac{(A-B+C) \sec ^4(c+d x) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}+\frac{(2 A+5 B-12 C) \sec ^3(c+d x) \tan (c+d x)}{35 a d (a+a \sec (c+d x))^3}-\frac{(B-4 C) \tan (c+d x)}{d \left (a^4+a^4 \sec (c+d x)\right )}-\frac{\int \sec (c+d x) \left (-105 a^4 (B-4 C)-a^4 (6 A-55 B+244 C) \sec (c+d x)\right ) \, dx}{105 a^8}\\ &=\frac{(3 A+25 B-88 C) \sec ^2(c+d x) \tan (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac{(A-B+C) \sec ^4(c+d x) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}+\frac{(2 A+5 B-12 C) \sec ^3(c+d x) \tan (c+d x)}{35 a d (a+a \sec (c+d x))^3}-\frac{(B-4 C) \tan (c+d x)}{d \left (a^4+a^4 \sec (c+d x)\right )}+\frac{(B-4 C) \int \sec (c+d x) \, dx}{a^4}+\frac{(6 A-55 B+244 C) \int \sec ^2(c+d x) \, dx}{105 a^4}\\ &=\frac{(B-4 C) \tanh ^{-1}(\sin (c+d x))}{a^4 d}+\frac{(3 A+25 B-88 C) \sec ^2(c+d x) \tan (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac{(A-B+C) \sec ^4(c+d x) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}+\frac{(2 A+5 B-12 C) \sec ^3(c+d x) \tan (c+d x)}{35 a d (a+a \sec (c+d x))^3}-\frac{(B-4 C) \tan (c+d x)}{d \left (a^4+a^4 \sec (c+d x)\right )}-\frac{(6 A-55 B+244 C) \operatorname{Subst}(\int 1 \, dx,x,-\tan (c+d x))}{105 a^4 d}\\ &=\frac{(B-4 C) \tanh ^{-1}(\sin (c+d x))}{a^4 d}+\frac{(6 A-55 B+244 C) \tan (c+d x)}{105 a^4 d}+\frac{(3 A+25 B-88 C) \sec ^2(c+d x) \tan (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac{(A-B+C) \sec ^4(c+d x) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}+\frac{(2 A+5 B-12 C) \sec ^3(c+d x) \tan (c+d x)}{35 a d (a+a \sec (c+d x))^3}-\frac{(B-4 C) \tan (c+d x)}{d \left (a^4+a^4 \sec (c+d x)\right )}\\ \end{align*}

Mathematica [B]  time = 6.39385, size = 1208, normalized size = 5.92 \[ \text{result too large to display} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sec[c + d*x]^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + a*Sec[c + d*x])^4,x]

[Out]

(32*(-B + 4*C)*Cos[c/2 + (d*x)/2]^8*Log[Cos[c/2 + (d*x)/2] - Sin[c/2 + (d*x)/2]]*Sec[c + d*x]^2*(A + B*Sec[c +
 d*x] + C*Sec[c + d*x]^2))/(d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x])*(a + a*Sec[c + d*x])^4) - (32*
(-B + 4*C)*Cos[c/2 + (d*x)/2]^8*Log[Cos[c/2 + (d*x)/2] + Sin[c/2 + (d*x)/2]]*Sec[c + d*x]^2*(A + B*Sec[c + d*x
] + C*Sec[c + d*x]^2))/(d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x])*(a + a*Sec[c + d*x])^4) + (4*Cos[c
/2 + (d*x)/2]^2*Sec[c/2]*Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(A*Sin[c/2] - B*Sin[c/2] + C*S
in[c/2]))/(7*d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x])*(a + a*Sec[c + d*x])^4) + (8*Cos[c/2 + (d*x)/
2]^4*Sec[c/2]*Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(3*A*Sin[c/2] - 10*B*Sin[c/2] + 17*C*Sin[
c/2]))/(35*d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x])*(a + a*Sec[c + d*x])^4) + (16*Cos[c/2 + (d*x)/2
]^6*Sec[c/2]*Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(6*A*Sin[c/2] - 55*B*Sin[c/2] + 139*C*Sin[
c/2]))/(105*d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x])*(a + a*Sec[c + d*x])^4) + (4*Cos[c/2 + (d*x)/2
]*Sec[c/2]*Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(A*Sin[(d*x)/2] - B*Sin[(d*x)/2] + C*Sin[(d*
x)/2]))/(7*d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x])*(a + a*Sec[c + d*x])^4) + (8*Cos[c/2 + (d*x)/2]
^3*Sec[c/2]*Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(3*A*Sin[(d*x)/2] - 10*B*Sin[(d*x)/2] + 17*
C*Sin[(d*x)/2]))/(35*d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x])*(a + a*Sec[c + d*x])^4) + (16*Cos[c/2
 + (d*x)/2]^5*Sec[c/2]*Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(6*A*Sin[(d*x)/2] - 55*B*Sin[(d*
x)/2] + 139*C*Sin[(d*x)/2]))/(105*d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x])*(a + a*Sec[c + d*x])^4)
+ (32*Cos[c/2 + (d*x)/2]^7*Sec[c/2]*Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(6*A*Sin[(d*x)/2] -
 160*B*Sin[(d*x)/2] + 559*C*Sin[(d*x)/2]))/(105*d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x])*(a + a*Sec
[c + d*x])^4) + (32*C*Cos[c/2 + (d*x)/2]^8*Sec[c]*Sec[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Sin[d
*x])/(d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x])*(a + a*Sec[c + d*x])^4)

________________________________________________________________________________________

Maple [A]  time = 0.076, size = 363, normalized size = 1.8 \begin{align*}{\frac{A}{56\,d{a}^{4}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{7}}-{\frac{B}{56\,d{a}^{4}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{7}}+{\frac{C}{56\,d{a}^{4}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{7}}+{\frac{3\,A}{40\,d{a}^{4}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{5}}-{\frac{B}{8\,d{a}^{4}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{5}}+{\frac{7\,C}{40\,d{a}^{4}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{5}}+{\frac{A}{8\,d{a}^{4}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{3}}-{\frac{11\,B}{24\,d{a}^{4}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{3}}+{\frac{23\,C}{24\,d{a}^{4}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{3}}+{\frac{A}{8\,d{a}^{4}}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }-{\frac{15\,B}{8\,d{a}^{4}}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }+{\frac{49\,C}{8\,d{a}^{4}}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }+{\frac{B}{d{a}^{4}}\ln \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +1 \right ) }-4\,{\frac{\ln \left ( \tan \left ( 1/2\,dx+c/2 \right ) +1 \right ) C}{d{a}^{4}}}-{\frac{C}{d{a}^{4}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +1 \right ) ^{-1}}-{\frac{B}{d{a}^{4}}\ln \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) -1 \right ) }+4\,{\frac{\ln \left ( \tan \left ( 1/2\,dx+c/2 \right ) -1 \right ) C}{d{a}^{4}}}-{\frac{C}{d{a}^{4}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) -1 \right ) ^{-1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^4*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^4,x)

[Out]

1/56/d/a^4*tan(1/2*d*x+1/2*c)^7*A-1/56/d/a^4*tan(1/2*d*x+1/2*c)^7*B+1/56/d/a^4*C*tan(1/2*d*x+1/2*c)^7+3/40/d/a
^4*tan(1/2*d*x+1/2*c)^5*A-1/8/d/a^4*tan(1/2*d*x+1/2*c)^5*B+7/40/d/a^4*C*tan(1/2*d*x+1/2*c)^5+1/8/d/a^4*A*tan(1
/2*d*x+1/2*c)^3-11/24/d/a^4*B*tan(1/2*d*x+1/2*c)^3+23/24/d/a^4*C*tan(1/2*d*x+1/2*c)^3+1/8/d/a^4*A*tan(1/2*d*x+
1/2*c)-15/8/d/a^4*B*tan(1/2*d*x+1/2*c)+49/8/d/a^4*C*tan(1/2*d*x+1/2*c)+1/d/a^4*ln(tan(1/2*d*x+1/2*c)+1)*B-4/d/
a^4*ln(tan(1/2*d*x+1/2*c)+1)*C-1/d/a^4*C/(tan(1/2*d*x+1/2*c)+1)-1/d/a^4*ln(tan(1/2*d*x+1/2*c)-1)*B+4/d/a^4*ln(
tan(1/2*d*x+1/2*c)-1)*C-1/d/a^4*C/(tan(1/2*d*x+1/2*c)-1)

________________________________________________________________________________________

Maxima [B]  time = 0.994374, size = 555, normalized size = 2.72 \begin{align*} \frac{C{\left (\frac{1680 \, \sin \left (d x + c\right )}{{\left (a^{4} - \frac{a^{4} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )}{\left (\cos \left (d x + c\right ) + 1\right )}} + \frac{\frac{5145 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac{805 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac{147 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac{15 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{a^{4}} - \frac{3360 \, \log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{4}} + \frac{3360 \, \log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{4}}\right )} - 5 \, B{\left (\frac{\frac{315 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac{77 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac{21 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac{3 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{a^{4}} - \frac{168 \, \log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{4}} + \frac{168 \, \log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{4}}\right )} + \frac{3 \, A{\left (\frac{35 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac{35 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac{21 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac{5 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}\right )}}{a^{4}}}{840 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^4,x, algorithm="maxima")

[Out]

1/840*(C*(1680*sin(d*x + c)/((a^4 - a^4*sin(d*x + c)^2/(cos(d*x + c) + 1)^2)*(cos(d*x + c) + 1)) + (5145*sin(d
*x + c)/(cos(d*x + c) + 1) + 805*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 147*sin(d*x + c)^5/(cos(d*x + c) + 1)^5
 + 15*sin(d*x + c)^7/(cos(d*x + c) + 1)^7)/a^4 - 3360*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^4 + 3360*log(
sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a^4) - 5*B*((315*sin(d*x + c)/(cos(d*x + c) + 1) + 77*sin(d*x + c)^3/(cos
(d*x + c) + 1)^3 + 21*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 3*sin(d*x + c)^7/(cos(d*x + c) + 1)^7)/a^4 - 168*l
og(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^4 + 168*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a^4) + 3*A*(35*sin(
d*x + c)/(cos(d*x + c) + 1) + 35*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 21*sin(d*x + c)^5/(cos(d*x + c) + 1)^5
+ 5*sin(d*x + c)^7/(cos(d*x + c) + 1)^7)/a^4)/d

________________________________________________________________________________________

Fricas [A]  time = 0.530904, size = 872, normalized size = 4.27 \begin{align*} \frac{105 \,{\left ({\left (B - 4 \, C\right )} \cos \left (d x + c\right )^{5} + 4 \,{\left (B - 4 \, C\right )} \cos \left (d x + c\right )^{4} + 6 \,{\left (B - 4 \, C\right )} \cos \left (d x + c\right )^{3} + 4 \,{\left (B - 4 \, C\right )} \cos \left (d x + c\right )^{2} +{\left (B - 4 \, C\right )} \cos \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 105 \,{\left ({\left (B - 4 \, C\right )} \cos \left (d x + c\right )^{5} + 4 \,{\left (B - 4 \, C\right )} \cos \left (d x + c\right )^{4} + 6 \,{\left (B - 4 \, C\right )} \cos \left (d x + c\right )^{3} + 4 \,{\left (B - 4 \, C\right )} \cos \left (d x + c\right )^{2} +{\left (B - 4 \, C\right )} \cos \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \,{\left (2 \,{\left (3 \, A - 80 \, B + 332 \, C\right )} \cos \left (d x + c\right )^{4} +{\left (24 \, A - 535 \, B + 2236 \, C\right )} \cos \left (d x + c\right )^{3} +{\left (39 \, A - 620 \, B + 2636 \, C\right )} \cos \left (d x + c\right )^{2} + 4 \,{\left (9 \, A - 65 \, B + 296 \, C\right )} \cos \left (d x + c\right ) + 105 \, C\right )} \sin \left (d x + c\right )}{210 \,{\left (a^{4} d \cos \left (d x + c\right )^{5} + 4 \, a^{4} d \cos \left (d x + c\right )^{4} + 6 \, a^{4} d \cos \left (d x + c\right )^{3} + 4 \, a^{4} d \cos \left (d x + c\right )^{2} + a^{4} d \cos \left (d x + c\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^4,x, algorithm="fricas")

[Out]

1/210*(105*((B - 4*C)*cos(d*x + c)^5 + 4*(B - 4*C)*cos(d*x + c)^4 + 6*(B - 4*C)*cos(d*x + c)^3 + 4*(B - 4*C)*c
os(d*x + c)^2 + (B - 4*C)*cos(d*x + c))*log(sin(d*x + c) + 1) - 105*((B - 4*C)*cos(d*x + c)^5 + 4*(B - 4*C)*co
s(d*x + c)^4 + 6*(B - 4*C)*cos(d*x + c)^3 + 4*(B - 4*C)*cos(d*x + c)^2 + (B - 4*C)*cos(d*x + c))*log(-sin(d*x
+ c) + 1) + 2*(2*(3*A - 80*B + 332*C)*cos(d*x + c)^4 + (24*A - 535*B + 2236*C)*cos(d*x + c)^3 + (39*A - 620*B
+ 2636*C)*cos(d*x + c)^2 + 4*(9*A - 65*B + 296*C)*cos(d*x + c) + 105*C)*sin(d*x + c))/(a^4*d*cos(d*x + c)^5 +
4*a^4*d*cos(d*x + c)^4 + 6*a^4*d*cos(d*x + c)^3 + 4*a^4*d*cos(d*x + c)^2 + a^4*d*cos(d*x + c))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{A \sec ^{4}{\left (c + d x \right )}}{\sec ^{4}{\left (c + d x \right )} + 4 \sec ^{3}{\left (c + d x \right )} + 6 \sec ^{2}{\left (c + d x \right )} + 4 \sec{\left (c + d x \right )} + 1}\, dx + \int \frac{B \sec ^{5}{\left (c + d x \right )}}{\sec ^{4}{\left (c + d x \right )} + 4 \sec ^{3}{\left (c + d x \right )} + 6 \sec ^{2}{\left (c + d x \right )} + 4 \sec{\left (c + d x \right )} + 1}\, dx + \int \frac{C \sec ^{6}{\left (c + d x \right )}}{\sec ^{4}{\left (c + d x \right )} + 4 \sec ^{3}{\left (c + d x \right )} + 6 \sec ^{2}{\left (c + d x \right )} + 4 \sec{\left (c + d x \right )} + 1}\, dx}{a^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**4*(A+B*sec(d*x+c)+C*sec(d*x+c)**2)/(a+a*sec(d*x+c))**4,x)

[Out]

(Integral(A*sec(c + d*x)**4/(sec(c + d*x)**4 + 4*sec(c + d*x)**3 + 6*sec(c + d*x)**2 + 4*sec(c + d*x) + 1), x)
 + Integral(B*sec(c + d*x)**5/(sec(c + d*x)**4 + 4*sec(c + d*x)**3 + 6*sec(c + d*x)**2 + 4*sec(c + d*x) + 1),
x) + Integral(C*sec(c + d*x)**6/(sec(c + d*x)**4 + 4*sec(c + d*x)**3 + 6*sec(c + d*x)**2 + 4*sec(c + d*x) + 1)
, x))/a**4

________________________________________________________________________________________

Giac [A]  time = 1.36198, size = 385, normalized size = 1.89 \begin{align*} \frac{\frac{840 \,{\left (B - 4 \, C\right )} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right )}{a^{4}} - \frac{840 \,{\left (B - 4 \, C\right )} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right )}{a^{4}} - \frac{1680 \, C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )} a^{4}} + \frac{15 \, A a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} - 15 \, B a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} + 15 \, C a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} + 63 \, A a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 105 \, B a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 147 \, C a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 105 \, A a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 385 \, B a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 805 \, C a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 105 \, A a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1575 \, B a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 5145 \, C a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{a^{28}}}{840 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^4,x, algorithm="giac")

[Out]

1/840*(840*(B - 4*C)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^4 - 840*(B - 4*C)*log(abs(tan(1/2*d*x + 1/2*c) - 1))
/a^4 - 1680*C*tan(1/2*d*x + 1/2*c)/((tan(1/2*d*x + 1/2*c)^2 - 1)*a^4) + (15*A*a^24*tan(1/2*d*x + 1/2*c)^7 - 15
*B*a^24*tan(1/2*d*x + 1/2*c)^7 + 15*C*a^24*tan(1/2*d*x + 1/2*c)^7 + 63*A*a^24*tan(1/2*d*x + 1/2*c)^5 - 105*B*a
^24*tan(1/2*d*x + 1/2*c)^5 + 147*C*a^24*tan(1/2*d*x + 1/2*c)^5 + 105*A*a^24*tan(1/2*d*x + 1/2*c)^3 - 385*B*a^2
4*tan(1/2*d*x + 1/2*c)^3 + 805*C*a^24*tan(1/2*d*x + 1/2*c)^3 + 105*A*a^24*tan(1/2*d*x + 1/2*c) - 1575*B*a^24*t
an(1/2*d*x + 1/2*c) + 5145*C*a^24*tan(1/2*d*x + 1/2*c))/a^28)/d